 
#include <string.h>
#include <math.h>
#include "system.h"
#include "f1c100s_de.h"
#include "f1c100s_timer.h"
#include "f1c100s_intc.h"
#include "f1c100s_gpio.h"
#include "f1c100s_pwm.h"
#include "f1c100s_uart.h"
#include "arm32.h"
#include "gpio.h"
#include "time0.h"
#include "twi.h"
#include "bsp_i2c_gpio.h"
uint8_t rxbuf0[256];
int main(void)
{
  system_init();            // Initialize clocks, mmu, cache, uart, ...
  arm32_interrupt_enable(); // Enable interrupts
  timer0_init();
  printf("\r\napp [twi] run. compiled_time %s %s\r\n", __DATE__, __TIME__);
  gpioe_exit_init();
  gpio_rst_pin_init();
  delay(500);
  i2c_gpio_init();
  uint8_t p[] = "0123abcdefghijklmnopqrstuvwxyz";
  AT24CXX_Write(0, p, sizeof(p));
  AT24CXX_Read(0, rxbuf0, sizeof(p));
  printf("24c02rx:%s", rxbuf0);
 
  while (1)
  {
    // rst_pin_set();
    // delay(200);
    // rst_pin_reset();
    // delay(200);
  }
}
